/**
 * 作者：陈文斌 on 2018/12/29.
 * 邮箱：chen_wennbin@163.com
 * 版本：v1.0
 */

import 'package:flutter/material.dart';
import 'package:crm/constant/constant.dart';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:crm/tools/shared_preferences_util.dart';
import 'package:crm/tools/string_util.dart';

class UserInfoSection extends StatefulWidget {
  @override
  State<StatefulWidget> createState() => _UserInfoSectionState();
}

class _UserInfoSectionState extends State<UserInfoSection> {
  String PhoneNumber;

  @override
  void initState() {
    super.initState();
    PhoneNumber = StringUtil.changePhoneNumberFormat('17805918554');
  }

  @override
  Widget build(BuildContext context) {
    return Container(
      width: AppScreen.setWidth(375),
      margin: EdgeInsets.only(top: AppScreen.setHeight(26)),
      child: Column(
        children: <Widget>[
          Container(
            width: AppScreen.setWidth(60),
            height: AppScreen.setWidth(60),
            decoration: BoxDecoration(
              borderRadius: BorderRadius.circular(30),
            ),
            child: ClipRRect(
              borderRadius: BorderRadius.circular(30),
              child: CachedNetworkImage(
                imageUrl: '',
                placeholder: (context, url) => Image.asset(
                  'images/ic_notice_head_image.png',
                  fit: BoxFit.fill,
                ),
              ),
            ),
          ),
          Container(
            margin: EdgeInsets.only(top: 10),
            child: Text(
              PhoneNumber,
              style: TextStyle(
                color: AppColors.TextColor,
                fontSize: AppFontSizes.Font16,
                fontFamily: AppFontFamilies.PingFangSC,
                fontWeight: FontWeight.w500,
              ),
            ),
          ),
        ],
      ),
    );
  }
}
